package com.example.sokecttest.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

// WebSocket消息DTO
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WebSocketMessage {
    public static final String TYPE_CHAT = "chat";
    public static final String TYPE_SESSION = "session";
    public static final String TYPE_USER_LIST = "userList";
    public static final String TYPE_DOCTOR_LIST = "doctorList";
    public static final String TYPE_CONNECT = "connect";

    private String type;            // 消息类型
    private String sessionId;       // 会话ID
    private String senderId;        // 发送者ID
    private String senderName;      // 发送者名称
    private String receiverId;      // 接收者ID
    private String content;         // 消息内容
    private long timestamp;         // 时间戳
    private List<?> data;           // 附加数据，用于列表更新
}